package com.bw.mallshop.mvvm.model;

import com.bw.common.entity.BaseEntity;
import com.bw.common.mvvm.model.BaseModel;
import com.bw.common.network.HttpType;
import com.bw.common.network.RetrofitFactory;
import com.bw.mallshop.repository.ApiService;

import java.util.Map;

import io.reactivex.Observable;

public class HomeModel extends BaseModel {

    public Observable<BaseEntity>requestHomeGoods(Map<String,Object>parames){
        return changeObservable(RetrofitFactory.factory(HttpType.TOKENSIGN).createRetrofit()
                .create(ApiService.class).requestHomeGoods(createBody(parames)));
    }
    public Observable<BaseEntity>loadHomeGoods(Map<String,Object>parames){
        return changeObservable(RetrofitFactory.factory(HttpType.TOKENSIGN).createRetrofit()
                .create(ApiService.class).loadHomeGoods(createBody(parames)));
    }
}
